package com.service.acl.controller;

import com.service.acl.service.RolePermissionService;
import com.service.utils.ResultVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("rolePermission")
public class RolePermissionController {

    @Autowired
    private RolePermissionService rolePermissionService;

    @PostMapping("saveRole/{roleId}")
    @ApiOperation("给指定的角色添加权限信息")
    public ResultVo saveRole(@PathVariable String roleId, @RequestBody List<String> permissionIds) {
        rolePermissionService.saveRole(roleId,permissionIds);
      return  ResultVo.ok();
    }

}
